package com.sinodata.bsm.common.vo;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * EventCorrelation entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "EVENT_CORRELATION")
public class EventCorrelation implements java.io.Serializable {

    /**
     * 
     */
    private static final long serialVersionUID = 7539462730539537615L;

    // Fields
    private Long id;
    private Long eventId;
    private Long policyId;
    private Long mainEventId;
    private Date createTime;

    // Constructors

    /** default constructor */
    public EventCorrelation() {
    }

    /** minimal constructor */
    public EventCorrelation(Long id) {
        this.id = id;
    }

    /** full constructor */
    public EventCorrelation(Long id, Long eventId, Long policyId, Long mainEventId, Date createTime) {
        this.id = id;
        this.eventId = eventId;
        this.policyId = policyId;
        this.mainEventId = mainEventId;
        this.createTime = createTime;
    }

    // Property accessors
    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequence")
    @SequenceGenerator(name = "sequence", sequenceName = "EVENT_CORRELATION_SEQ")
    @Column(name = "ID", unique = true, nullable = false, precision = 22, scale = 0)
    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Column(name = "EVENT_ID", precision = 22, scale = 0)
    public Long getEventId() {
        return this.eventId;
    }

    public void setEventId(Long eventId) {
        this.eventId = eventId;
    }

    @Column(name = "POLICY_ID", precision = 22, scale = 0)
    public Long getPolicyId() {
        return this.policyId;
    }

    public void setPolicyId(Long policyId) {
        this.policyId = policyId;
    }

    @Column(name = "MAIN_EVENT_ID", precision = 22, scale = 0)
    public Long getMainEventId() {
        return this.mainEventId;
    }

    public void setMainEventId(Long mainEventId) {
        this.mainEventId = mainEventId;
    }

    @Column(name = "CREATE_TIME", length = 7)
    public Date getCreateTime() {
        return this.createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        return "EventCorrelation [id=" + id + ", eventId=" + eventId + ", policyId=" + policyId + ", mainEventId=" + mainEventId + ", createTime=" + createTime + "]";
    }

}